package hander

import (
	"github.com/gin-gonic/gin"
	"good/api/reponse"
	"good/api/request"
	"good/internal/dao"
	"good/internal/models"
)

func SearchRecordDel(c *gin.Context) {
	req := request.MessageDel{}
	if err := c.ShouldBind(&req); err != nil {
		reponse.ErrorRequest(c, "绑定失败")
		return
	}
	user := models.SearchRecord{}
	if err := dao.SearchRecordDel(&user, req.Id); err != nil {
		reponse.ErrorRequest(c, "删除单条历史失败")
		return
	}
	reponse.SuccessRequest(c, "删除单条历史成功", user.ID)
}
